const db= require('../../db/index');
let selectidarticle=(req,res)=>{
    // sql
    const sqlStr=`select * from ev_articles where Id=? `;
    db.query(sqlStr,req.params.id,(err,results)=>{
        if(err) return res.cc(err);
        if(results.length!==1) return res.cc('文章获取失败')
        res.send({
            status:0,
            message:'获取文章成功',
            data:results
        })
    })
    

}
module.exports =selectidarticle